package kr.hyunist.musicplayproject.Service;

import java.util.ArrayList;

import kr.hyunist.musicplayproject.Adapter.ListAdapter;
import kr.hyunist.musicplayproject.DTO.MyMusic;
import android.app.Service;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.IBinder;

public class MusicService extends Service {
	MediaPlayer mPlayer;
	ListAdapter adapter;
	ArrayList<MyMusic> arList;
	MyMusic mySong;
	
	@Override
	public void onCreate() {
		//super.onCreate();
		mPlayer = new MediaPlayer();
		mPlayer.setDataSource(getApplication(), );
		mPlayer.setLooping(false);
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		super.onStartCommand(intent, flags, startId);
		
		mPlayer.start();
		
		return START_STICKY;
	}

	@Override
	public void onDestroy() {
		//super.onDestroy();
		mPlayer.stop();
	}

	@Override
	public IBinder onBind(Intent intent) {
		return null;
	}

}
